# Maintainer:
pkgname=py3-untokenize
pkgver=0.1.1
pkgrel=1
pkgdesc=" Transforms tokens into original source code"
url="https://github.com/myint/untokenize"
arch="noarch"
license="MIT"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/myint/untokenize/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/untokenize-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m unittest discover
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
ea47c2936945c2bf69196800e15188ec264004413dc62ddb0b3097eb6c6e70335191ec43b81cb1a7842c6bd0218dd1806525de8dfd21eea88aca4c56b6035ad7  py3-untokenize-0.1.1.tar.gz
"
